The withdrawal of support by the two MLAs to the government has dealt another blow to the coalition which is tottering on the brink of collapse after 13 MLAs of the combine resigned on Saturday.
The government also termed the alleged insult to the farmer as an infringement on "dignity and self-respect", and said it cannot be tolerated.
Shankar went to Karnataka Legislative Council chairman Basavaraj Horatti's office and tendered his hand-written resignation.
Both the Independent legislators were absent on the first day of the session.
After a series of deliberations, the BJP on Tuesday announced its first list of 189 candidates and a second list of 23 on Wednesday night.
While former deputy chief minister Laxman Savadi announced his decision to resign from primary membership of the party, minister and six-time MLA S Angara from Sullia constitiuency in Dakshina Kannada district announced his retirement from politics.
The BJP will need to win at least six seats to remain in power.
The BJP won 12 of 15 seats on which bypolls were held. Congress could win only two.
The by-elections are being held to fill the vacancies caused by the disqualification of 17 rebel Congress and Janata Dal-Secular MLAs, whose rebellion led to the collapse of the H D Kumaraswamy-led coalition government in July and paved the way for the BJP to come to power.